package boogui.member;



public class MemberLoginService implements IMemberLoginService {
	
	IMemberLoginDAO ml = null;
	IMemberLoginDAO mldao = null;
	public MemberLoginService() {
		ml = new MemberLoginDAO();
		mldao = new MemberLoginDAO();
	}
	
	@Override
	public boolean memberLogin(MemberVO m) {
		String p = ml.selectPwd(m.getMemid());
		ml.loginWho(m.getMemid());
		return m.getMempwd().equals(p);
	}	
	

	@Override
	public void getloginView(MemberVO m) {
		for (MemberVO v : mldao.loginView()){
			m.setMemid(v.getMemid());
			m.setMemname(v.getMemname());
			m.setMemhp(v.getMemhp());
			m.setMememail(v.getMememail());
			m.setMembirth(v.getMembirth());
			m.setMemgenre(v.getMemgenre());
		}
	}

	
}
